<#assign flowdescid=auth.getuuid()>
<div class="bjui-pageHeader" style="text-align: center;">
	请假单
</div>
<!-- <div class="bjui-pageContent"> -->

        <#if (formdata)?exists>
			    <form action="${rootpath}/Flow/form_save"  class="pageForm" data-toggle="validate" data-reload="true">
			        <input type="hidden" name="__id" value="${formdata.id!}"><!-- 表单的ID -->
			        <input type="hidden" name="__orderid" value="${orderid!}"><!-- 流程实例ID -->
			        <input type="hidden" name="__taskid" value="${taskid!}"><!-- 任务ID -->
			        <input type="hidden" name="__formpath" value="${formpath!}"><!-- 任务路径 -->
			        <input type="hidden" name="__ordertitlecolname" value="leave_desc"><!-- 用此列名更新实例标题 -->
			        <input type="hidden" name="__argscolname" value="leave_days"><!-- 写入流程参数MAP的列名，逗号分隔 -->
			        <div class="pageFormContent">
			            <table class="table table-condensed table-hover" width="100%">
			                <tbody>
			                	<tr>
			                		<td colspan="2">
			                            <label class="control-label x70">申请时间：</label>
			                            <input type="text" name="pm_create_time" value="${formdata.pm_create_time!}" readonly="readonly" size="15">
			                        </td>
			                	</tr>
			                    <tr>
			                        <td>
			                            <label  class="control-label x70">申请人：</label>
			                            <input type="text" name="pm_creator" value="${formdata.pm_creator!}" readonly="readonly" size="15">
			                        </td>
			                        <td>
			                            <label class="control-label x70">申请部门：</label>
			                            <input type="text" name="pm_creator_dept" value="${formdata.pm_creator_dept!}" readonly="readonly" size="15">
			                        </td>
			                    </tr>
								<tr>
									<td colspan="2">
										<label class="control-label x70">假别：</label>
										<select name="leave_type" data-toggle="selectpicker" data-defval="${formdata.leave_type!}" data-rule="required">
			                                <option value="年假">年假</option>
			                                <option value="事假">事假</option>
			                                <option value="病假">病假</option>
			                            </select>
									</td>
								</tr>
								<tr>
									<td colspan="2">
										<label class="control-label x70">请假天数：</label>
										<input type="text" name="leave_days" value="${formdata.leave_days!}" data-toggle="spinner"  data-rule="required;number" size="15">
									</td>
								</tr>
								<tr>
			                        <td>
			                            <label  class="control-label x70">开始时间：</label>
			                            <input type="text" name="leave_time_s" value="${formdata.leave_time_s!}" data-toggle="datepicker" data-pattern="yyyy-MM-dd HH:mm:ss" data-rule="required;datetime" size="17">
			                        </td>
			                        <td>
			                            <label class="control-label x70">结束时间：</label>
			                            <input type="text" name="leave_time_e" value="${formdata.leave_time_e!}" data-toggle="datepicker" data-pattern="yyyy-MM-dd HH:mm:ss" data-rule="required;datetime" size="17">
			                        </td>
			                    </tr>
			                    <tr>
			                    	<td colspan="2">
										<label class="control-label x70">请假说明：</label>
										<textarea id="${flowdescid}" data-toggle="autoheight" name="leave_desc" rows="1" cols="50">${formdata.leave_desc!}</textarea>
									</td>
			                    </tr>
			                </tbody>
			            </table>
			        </div>
			        <div >
			            <ul>
			                <li class="pull-left"><button type="submit" class="btn-default" data-icon="save">保存表单</button></li>
							<!-- 流转、转发、驳回 按钮 如需先调用保存表单data-toggle="formsubmitdoajax" 无需保存表单data-toggle="doajax" -->
			                <li class="pull-right"><a class="btn btn-green" data-reload="false" data-icon="check" data-toggle="formsubmitdoajax" data-warn="URL参数不正确！" href="${rootpath}/Flow/task_exec?type=1&typename=申请&typedesc={#${flowdescid}}&taskid=${taskid}">申请</a></li>
				        	<!-- <li class="pull-right"><a class="btn btn-red"   data-reload="false" data-icon="close" data-toggle="formsubmitdoajax" data-warn="URL参数不正确！" href="${rootpath}/Flow/task_exec?type=-1&typename=驳回&typedesc={#${flowdescid}}&taskid=${taskid}">驳回</a></li>
				        	<li class="pull-right"><a class="btn btn-blue"  data-reload="false" data-icon="share" data-toggle="formsubmitdoajax" data-warn="URL参数不正确！" href="${rootpath}/Flow/task_exec?type=0&typename=转发&typedesc={#${flowdescid}}&taskid=${taskid}">转发</a></li>
			            	 --><li class="pull-right"><a href="${rootpath}/Snaker/orderview?orderid=${orderid}" data-toggle="dialog" data-id="snakerorderview" 
                        			data-width="980" data-height="780" data-mask="true" data-type="POST" 
                        			data-title="流程实例流程图" class="btn btn-blue">查看流程图</a></li>
			            </ul>
			        </div>
			    </form>
	    </#if>
<!-- </div> -->